<template>
  <view class="success">
    <image src="/static/success.png" class="success-icon"></image>
    <text class="success-message">报名成功！</text>
    <text class="confirmation-number">报名号：{{firtext.telephone}}</text>
    <button @click="goToHome">返回首页</button>
  </view>
</template>

<script>
export default {
	mounted() {
		this.postData()
	},
	data() {
	  return {
	    formData: {},
		  name: '',
		  text:[],
		  firtext:'',
	  };
	},
	
	
	
	
	
	
	
  methods: {
    goToHome() {
      uni.navigateTo({
        url: '/pages/index/index'
      });
    },

	postData(){
		uni.request({
		  url: "http://localhost:8231/getTLSAplData",
		  method: "POST",
		  data: {
		    params: {},
		  },
		  // header: {
		  //   'content-type': 'application/json', // 设置请求头
		  // },
		  success: (res) => {
		    this.text = res.data.result.application; // 将响应数据存储在 text 变量中
			this.firtext=this.text[0];
		  },
		  // fail: (err) => {
		  //   console.error(err);
		  // },
		});
	},
	
	
	
	
	
	
  }
};
</script>

<style scoped>
/* 样式根据学校的设计来调整 */
.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.success-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
}

.success-message {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.confirmation-number {
  font-size: 16px;
  margin-bottom: 20px;
  color: #666;
}

button {
  width: 200px;
  height: 50px;
  background-color: #007AFF;
  color: #fff;
  border-radius: 25px;
  font-size: 18px;
  text-align: center;
  line-height: 50px;
  cursor: pointer;
}
</style>
